<template>
  <view class="record-content">
    <view
      class="record-item"
      @click="goDetail(item.id)"
      v-for="item in rectifyList"
      :key="item.id"
    >
  
	   <view class="item-title done">
        <view class="left-border"></view>
        <view class="left">{{ rectifyStatus[item["整改状态"]] }}</view>
        <view class="right">整改日期：{{ item["整改开始日期"] }}</view>
      </view>
      <view class="item-content">
        <view class="content-top un-evaluate">
          <view class="overflow">检查点名称 ：{{ item["检查点名称"] }}</view>
          <!-- <view class="have-evaluate">已评价</view> -->
        </view>
        <view class="content-center overflow"
          >检查点地址 ：{{ item["地址"] }}</view
        >
        <view class="content-bottom overflow"
          >整改事项：{{
            item["整改项"] ?
            item["整改项"].map((item) => item.整改项描述).join() : '无'
          }}</view
        >
        <view class="arrow"></view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    rectifyList: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      rectifyStatus: this.$type.rectifyStatus,
    };
  },
  methods: {
    goDetail(id) {
      uni.navigateTo({
        url: "/fireGridCheck/rectifyTaskDetail/rectifyTaskDetail?id=" + id,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.record-content {
  .record-item {
    .done {
      display: flex;
      justify-content: space-between;
      padding-right: 10rpx;
    }

    width: 710rpx;
    height: 282rpx;
    background-color: #fff;
    box-shadow: 0px 1rpx 11rpx 1rpx #eeeeee;
    border-radius: 8rpx;
    margin: 15rpx 0;
    margin-left: 20rpx;

    .item-title {
      width: 100%;
      height: 71rpx;
      display: flex;
      padding-right: 30rpx;
      align-items: center;
      border-bottom: 2rpx solid #eee;
      position: relative;

      // padding-top: 10rpx;
      .left-border {
        width: 6rpx;
        height: 30rpx;
        background-color: #1064e9;
        position: absolute;
        left: 0;
        top: 20rpx;
      }

      .left {
        padding-left: 30rpx;
        color: #333;
        font-weight: bold;
        margin-right: 112rpx;
      }

      .center {
        display: flex;
        color: #fd9938;
        margin-right: 120rpx;

        .center-img {
          width: 29rpx;
          height: 32rpx;
          margin-right: 6rpx;
          margin-top: 6rpx;

          image {
            width: 100%;
            height: 100%;
          }
        }
      }

      .right {
        // color: #FF8686;
        // width: 82rpx;
        // height: 36rpx;
        // font-size: 22rpx;
        // border: 2rpx solid #FF8686;
        // text-align: center;
      }

      .compete {
        color: #83d065;
        width: 82rpx;
        height: 36rpx;
        font-size: 22rpx;
        border: 2rpx solid #83d065;
        text-align: center;
      }
    }

    .item-content {
      color: #666;
      padding: 30rpx;
      font-size: 28rpx;
      position: relative;
      .un-evaluate {
        display: flex;

        .evaluate-icon {
          margin-left: 62rpx;
          width: 96rpx;
          height: 48rpx;
          background-color: #ffa85b;
          font-size: 26rpx;
          color: #fff;
          text-align: center;
          line-height: 48rpx;
        }

        .have-evaluate {
          width: 96rpx;
          height: 48rpx;
          text-align: center;
          align-items: center;
          color: #ccc;
          font-size: 26rpx;
          margin-left: 62rpx;
          border: 2rpx solid #bfbfbf;
          border-radius: 2rpx;
        }
      }

      .content-top {
        margin-bottom: 16rpx;
      }
      .content-center {
        margin-bottom: 10rpx;
        // width: 22em;
        // overflow: hidden;
        // white-space: nowrap;
        // text-overflow: ellipsis;
      }
      .overflow {
        width: 21em;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
      .arrow {
        width: 24rpx;
        height: 24rpx;
        border-top: 2rpx solid #666;
        border-right: 2rpx solid #666;
        transform: rotate(45deg);
        position: absolute;
        top: 80rpx;
        right: 40rpx;
      }
    }
  }
}
</style>
